home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 14 / Hot Mix 14.iso / HTML / vendors / finesse / RemoveIt2 < prev    next >
Text File  |  1996-06-27  |  2KB  |  71 lines

  1. #!/bin/csh -f
  2.  
  3. set INST_DIR=finesse
  4.  
  5. if ( -r /usr/tmp/HOTMIXPATH_$INST_DIR ) then
  6.   source /usr/tmp/HOTMIXPATH_$INST_DIR
  7. else if ( -r /tmp/HOTMIXPATH_$INST_DIR ) then
  8.   source /tmp/HOTMIXPATH_$INST_DIR
  9. else if ( -r ~/HOTMIXPATH_$INST_DIR ) then
  10.   source ~/HOTMIXPATH_$INST_DIR
  11. else
  12.     LOOP1:
  13.     echo " "
  14.     echo "Enter the name of the directory where finesse "
  15.     echo "is installed ( q to quit ) :  \c"
  16.     set INST_PATH = $<
  17.  
  18.     if ($#INST_PATH == 0 ) then
  19.         echo " "
  20.         echo "Input Error.  Please try again."
  21.         goto LOOP1
  22.     else if ( $INST_PATH == 'q' ) then
  23.         echo " "
  24.         echo ... Bye"
  25.         sleep 3
  26.         exit
  27.     endif
  28.     if ( ! -d $INST_PATH ) then
  29.         echo " "
  30.         echo "Can't find the $INST_PATH directory."
  31.         echo " "
  32.         echo "Press Enter to quit, and then try again.  \c"
  33.         set a = $<
  34.         \rm -f /usr/tmp/HOTMIXPATH_$INST_DIR > /dev/null
  35.         \rm -f /tmp/HOTMIXPATH_$INST_DIR > /dev/null
  36.         \rm -f ~/HOTMIXPATH_$INST_DIR > /dev/null
  37.         exit -1
  38.     endif
  39. endif
  40.  
  41. echo " "
  42. echo "About to remove the entire $INST_PATH directory."
  43. LOOP2:
  44. echo " "
  45. echo "Continue (y/n)?  \c"
  46. set a = $<
  47. if ( $a == 'n' ) then
  48.     exit -1
  49. else if ( $a == 'y' ) then
  50. else
  51.     goto LOOP2
  52. endif
  53.  
  54. if ( -w $INST_PATH ) then
  55.     \rm -rf $INST_PATH
  56. else
  57.     echo " "
  58.     echo "You have no permission to remove the $INST_PATH directory"
  59.     echo " "
  60.     su - root -c "/bin/rm -rf $INST_PATH"
  61. endif
  62. \rm -f /usr/tmp/HOTMIXPATH_$INST_DIR > /dev/null
  63. \rm -f /tmp/HOTMIXPATH_$INST_DIR > /dev/null
  64. \rm -f ~/HOTMIXPATH_$INST_DIR > /dev/null
  65.  
  66. echo " "
  67. echo "Removal Complete\!"
  68. echo " "
  69. echo "Press Enter to exit this window...  \c"
  70. set a = $<
  71.